#pragma once

#include <optix.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sutil.h>
#include "Geometry.h"
#include "SampleScene.h"
#include <GLUTDisplay.h>
#include "device_util.h"
 
#include <optixu/optixu_math_namespace.h>


class Photon: public SampleScene {
private:	 
  Program ray_gen_program;
  Buffer  output_buffer;
	Buffer	photon_buffer;
	Buffer	hit_buffer;
	Buffer  kd_buffer;

	unsigned int width, height;
  unsigned int pl_width, pl_height; 

	bool _canRender;

public:
	static const unsigned int maxPhotonsPerRay = 5;

	// Create the optix scene and return initial viewing parameters
  void initScene( InitialCameraData& camera_data );
  
  // Update camera shader with new viewing params and then trace
  void trace( const RayGenCameraData& camera_data );
 
  // Return the output output_buffer to be displayed
  Buffer getOutputBuffer();

};